/**
 * @param {ListNode} head
 * @return {boolean}
 */
 var hasCycle = function(head) {
    let left =right =head
    while(right && right.next){
      left = head.next
      right = head.next.next
      if(left == right) return true
      head = head.next
    }
    return false
};